package com.example.demo.dto;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

public class FileUploadDTO {


    private String username;
    private String uploadTime;
    private MultipartFile source;
    private File target;
    private String path = "F:\\Project\\预算管理_书吧\\yongyou\\src\\main\\resources\\file\\";

    public FileUploadDTO(String fileName){
        this.target=new File(path+fileName);
    }

    public void setTarget(File target) {
        this.target = target;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public FileUploadDTO(String path, String fileName){
        this.target=new File(path+fileName);
        this.path=path;
    }

    public String getPath() {
        return path;
    }

    public File getTarget() {
        return target;
    }

    public String getUsername() {

        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(String uploadTime) {
        this.uploadTime = uploadTime;
    }

    public MultipartFile getSource() {
        return source;
    }

    public void setSource(MultipartFile source) {
        this.source = source;
    }
}
